IHipGamepad

Undocumented in source.

Members

Functions

getAnalogState
float[3] getAnalogState(HipGamepadAnalogs analog)

Returns a Vector3 containing the current state of the analog

getBatteryStatus
float getBatteryStatus()

Returns the battery status in range 0 - 1, only makes sense when wireless

getId
ubyte getId()

Returns the Id for this controller, usually the order in which it was connected

isButtonJustPressed
bool isButtonJustPressed(HipGamepadButton btn)
Undocumented in source.
isButtonJustReleased
bool isButtonJustReleased(HipGamepadButton btn)
Undocumented in source.
isButtonPressed
bool isButtonPressed(HipGamepadButton btn)

Receives a gamepad button

isButtonPressed
bool isButtonPressed(string btn)
Undocumented in source. Be warned that the author may not have intended to support it.
isConnected
bool isConnected()

After first created, gamepads are never destroyed, use this property for using it or not

isVibrating
bool isVibrating()
Undocumented in source.
isWireless
bool isWireless()

Knowing wether it is wireless may be essential for showing battery alert

poll
void poll(float deltaTime)

Completely implementation dependent, deltaTime is used for it auto stop vibrating

setConnected
void setConnected(bool connected)

May include an implementation for turning gamepad off

setDeadzone
void setDeadzone(float threshold)

This will set a deadzone for making gamepad doesn't issue any kind of event until the threshold

setVibrating
bool setVibrating(float vibrationPower, float time)

Returns wether it is vibrating. Receives a time to stop vibrating

Meta